<?php
/**
 * Routes configuration
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different URLs to chosen controllers and their actions (functions).
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.Config
 * @since         CakePHP(tm) v 0.2.9
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */
/**
 * Here, we are connecting '/' (base path) to controller called 'Pages',
 * its action called 'display', and we pass a param to select the view file
 * to use (in this case, /app/View/Pages/home.ctp)...
 */
/**
 * ...and connect the rest of 'Pages' controller's URLs.
 */
    Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
    // main menu
    Router::connect('/', array('controller' => 'MainMenu', 'action' => 'index'));
    Router::connect('/ftp', array('controller' => 'MainMenu', 'action' => 'retrieveFileFromFtp'));

    // import data
    Router::connect('/import', array('controller' => 'MainMenu', 'action' => 'importDataFromFile'));
    // maintenance menu
    Router::connect('/maitains', array('controller' => 'MaintenanceMenu', 'action' => 'index'));
    // report pages
    Router::connect('/reports', array('controller' => 'ReportMenu', 'action' => 'index'));
    Router::connect('/frmShipper', array('controller' => 'ReportMenu', 'action' => 'frmShipper'));
    Router::connect('/frmArea', array('controller' => 'ReportMenu', 'action' => 'frmArea'));
    Router::connect('/frmShippingFee', array('controller' => 'ReportMenu', 'action' => 'frmShippingFee'));
    // report pdf pages
    Router::connect('/frmShipperPdfHtml', array('controller' => 'ReportMenu', 'action' => 'frmShipperPdfHtml'));
    Router::connect('/frmShipperPdf', array('controller' => 'ReportMenu', 'action' => 'frmShipperPdf'));
    Router::connect('/frmShippingFeePdfHtml', array('controller' => 'ReportMenu', 'action' => 'frmShippingFeePdfHtml'));
    Router::connect('/frmShipperDiffPdf', array('controller' => 'MaintenanceMenu', 'action' => 'frmShipperDiffPdf'));
    Router::connect('/frmShipperDiffPdfHtml', array('controller' => 'MaintenanceMenu', 'action' => 'frmShipperDiffPdfHtml'));
    Router::connect('/frmShippingFeePdf', array('controller' => 'ReportMenu', 'action' => 'frmShippingFeePdf'));
    Router::connect('/frmAreaPdfHtml', array('controller' => 'ReportMenu', 'action' => 'frmAreaPdfHtml'));
    Router::connect('/frmAreaPdf', array('controller' => 'ReportMenu', 'action' => 'frmAreaPdf'));
	
	Router::connect('/frmDataImageImExHtml', array('controller' => 'ReportMenu', 'action' => 'frmDataImageImExHtml'));
	Router::connect('/frmDataImageExHtml', array('controller' => 'ReportMenu', 'action' => 'frmDataImageExHtml'));
	Router::connect('/frmShippingStoreFeePdfHtml', array('controller' => 'ReportMenu', 'action' => 'frmShippingStoreFeePdfHtml'));
	Router::connect('/frmShippingStoreFeePdf', array('controller' => 'ReportMenu', 'action' => 'frmShippingStoreFeePdf'));
 	
 	Router::connect('/frmShippingFeeListPdfHtml', array('controller' => 'ReportMenu', 'action' => 'frmShippingFeeListPdfHtml'));
	Router::connect('/frmShippingFeeListPdf', array('controller' => 'ReportMenu', 'action' => 'frmShippingFeeListPdf'));
	
 	Router::connect('/frmDataImageImExInputPdfHtml', array('controller' => 'ReportMenu', 'action' => 'frmDataImageImExInputPdfHtml'));
	Router::connect('/frmDataImageImExInputPdf', array('controller' => 'ReportMenu', 'action' => 'frmDataImageImExInputPdf'));	
 
 	Router::connect('/frmDataImageExInputPdfHtml', array('controller' => 'ReportMenu', 'action' => 'frmDataImageExInputPdfHtml'));
	Router::connect('/frmDataImageExInputPdf', array('controller' => 'ReportMenu', 'action' => 'frmDataImageExInputPdf'));	
  
    // other pages
    Router::connect('/frmKanri', array('controller' => 'MaintenanceMenu', 'action' => 'frmKanri'));
    Router::connect('/frmProductDiff', array('controller' => 'MaintenanceMenu', 'action' => 'frmProductDiff'));
    Router::connect('/frmShipperDiff', array('controller' => 'MaintenanceMenu', 'action' => 'frmShipperDiff'));

    Router::connect('/frmFooter', array('controller' => 'ReportMenu', 'action' => 'frmFooter'));
    // static pages
    Router::connect('/guide', array('controller' => 'Guide', 'action' => 'index'));
    // ajax
    Router::connect('/ajax/shipper', array('controller' => 'Ajax', 'action' => 'shipperChange'));
    Router::connect('/ajax/shipper_diff', array('controller' => 'Ajax', 'action' => 'shipperDiffChange'));
    Router::connect('/ajax/shipping_fee', array('controller' => 'Ajax', 'action' => 'shippingFeeChange'));
    Router::connect('/ajax/area', array('controller' => 'Ajax', 'action' => 'areaChange'));
    Router::connect('/ajax/kanri', array('controller' => 'Ajax', 'action' => 'kanriChange'));
    Router::connect('/ajax/product_diff', array('controller' => 'Ajax', 'action' => 'productChange'));
	Router::connect('/ajax/shippingExcel', array('controller' => 'ReportMenu', 'action' => 'shippingFeeExcel'));
	Router::connect('/ajax/frmDataImagePdf', array('controller' => 'ReportMenu', 'action' => 'frmDataImagePdf'));
	Router::connect('/ajax/restore', array('controller' => 'MaintenanceMenu', 'action' => 'restore'));
	
	Router::connect('/ajax/backup', array('controller' => 'MaintenanceMenu', 'action' => 'backup'));
	
	// users
	Router::connect('/login', array('controller' => 'Users', 'action' => 'login'));
	Router::connect('/logout', array('controller' => 'Users', 'action' => 'logout'));
	


/**
 * Load all plugin routes. See the CakePlugin documentation on
 * how to customize the loading of plugin routes.
 */
    CakePlugin::routes();

/**
 * Load the CakePHP default routes. Only remove this if you do not want to use
 * the built-in default routes.
 */
    require CAKE . 'Config' . DS . 'routes.php';
